package com.lailai.bizobject;

import com.lailai.constant.BizObjectType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;

/**
 * @Author lgr
 * @Date 2025/9/15
 * @Description 业务对象
 * @Email 983105834@qq.com
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BizObject {
    // 模块编码
    private String modelCode;
    // 表名编码
    private String tableCode;
    // 业务对象类型
    private BizObjectType bizObjectType;
    // 业务对象实体
    private BizObjectEntity bizObjectEntity;
    // 父级业务对象
    private BizObject parentBizObject;
    // 子级业务对象
    private Map<String, List<BizObject>> childBizObjects;
    // 用于编译正则表达式并创建匹配模式对象
    private static final Pattern VARIABLE_PATTERN = Pattern.compile("[{](.*?)[}]");
}
